package com.itheima.pojo;

import lombok.Data;
import lombok.ToString;

import java.util.List;

@Data
@ToString
public class Goods {
    private Integer id;
    private String title;
    private Long price; // 价格放大了100倍
    private String pic_thumbnail;
    private String pic;
    private String store_name;
    private String sub_title;
    private String total_comment;

    private List<Comment> comments;

    // 处理价格
    public String getRealPrice() {
        return String.format("%.2f", price / 100.0);
    }
}
